﻿
@{
    ViewBag.Title = "Create";
    Layout = "~/Views/Shared/_LayoutBase.cshtml";
}
<div id="dMain">
    <div class="wrapper wrapper-content animated fadeInRight">
        <div class="ibox" style="margin-bottom: 0px;">
            <div class="ibox-title">
                <h4>@ViewBag.Title </h4>
            </div>
            <div class="ibox-content">
                @using (Html.BeginForm())
                {
                    @Html.AntiForgeryToken()
                <div class="from-content">
                    <dl>
                        <dt>公文标题</dt>
                        <dd>
                            @Html.EditorFor(model => model.SUBJECT, new { htmlAttributes = new { @class = "input normal form-control", datatype = "*2-100", sucmsg = " " } })
                        </dd>
                    </dl>
                    <dl>
                        <dt>紧急程度</dt>
                        <dd>
                            <div class="rule-single-select">
                                @Html.DropDownListFor(model => model.TYPE_ID, new List<SelectListItem>(), new { @class = "form-control", datatype = "*", sucmsg = " " })
                            </div>
                        </dd>
                    </dl>
                    <dl>
                        <dt>秘密等级</dt>
                        <dd>
                            @Html.TextAreaFor(model => model.TO_ID, new { @class = "input normal form-control", datatype = "*2-100", sucmsg = " " })
                            <a class="icon-btn add spec-btn"><span>添加</span></a>
                        </dd>
                    </dl>
                    <dl>
                        <dt>发文页数</dt>
                        <dd>
                            @Html.TextAreaFor(model => model.USER_ID, new { @class = "input normal form-control" })
                            <a class="icon-btn add spec-btn"><span>添加</span></a>
                        </dd>
                    </dl>
                    <dl>
                        <dt>拟搞单位</dt>
                        <dd>
                            @Html.TextAreaFor(model => model.PRIV_ID, new { @class = "input normal form-control" })
                            <a class="icon-btn add spec-btn"><span>添加</span></a>
                        </dd>
                    </dl>
                    <dl>
                        <dt>拟稿人</dt>
                        <dd>
                            @Html.EditorFor(model => model.SEND_TIME, new { htmlAttributes = new { @Class = "input rule-date-input form-control", onfocus = "WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})", datatype = @"/^\s*$|^\d{4}\-\d{1,2}\-\d{1,2}\s{1}(\d{1,2}:){2}\d{1,2}$/", errormsg = "请选择正确的日期", sucmsg = " " } })
                        </dd>
                    </dl>
                    <dl>
                        <dt>主送单位</dt>
                        <dd>
                            @Html.EditorFor(model => model.BEGIN_DATE, new { htmlAttributes = new { @Class = "input rule-date-input form-control", onfocus = "WdatePicker({maxDate:'#F{$dp.$D(\'END_DATE\')||\'2020-10-01\'}'})", datatype = @"/^\s*$|^\d{4}\-\d{1,2}\-\d{1,2}\s{1}(\d{1,2}:){2}\d{1,2}$/", errormsg = "请选择正确的日期", sucmsg = " " } })
                            至
                            @Html.EditorFor(model => model.END_DATE, new { htmlAttributes = new { @Class = "input rule-date-input form-control", onfocus = "WdatePicker({minDate:'#F{$dp.$D(\'BEGIN_DATE\')}',maxDate:'2020-10-01'})", datatype = @"/^\s*$|^\d{4}\-\d{1,2}\-\d{1,2}\s{1}(\d{1,2}:){2}\d{1,2}$/", errormsg = "请选择正确的日期", sucmsg = " " } })
                        </dd>
                    </dl>
                    <dl>
                        <dt>接收人</dt>
                        <dd>
                            <div class="rule-single-checkbox">
                                @Html.CheckBox("TOP", true, new { @class = "form-control" })
                            </div>
                            <span>使公告通知置顶，显示为重要</span>
                            @Html.EditorFor(model => model.TOP_DAYS, new { htmlAttributes = new { Class = "input small form-control", datatype = "n", sucmsg = " ", value = "0" } })
                            <span>天后结束置顶，0表示一直置顶</span>
                        </dd>
                    </dl>
                    <dl>
                        <dt>主送</dt>
                        <dd>
                            @Html.EditorFor(model => model.SUMMARY, new { htmlAttributes = new { @class = "input normal form-control", datatype = "*2-100", sucmsg = " " } })
                        </dd>
                    </dl>
                    <dl>
                        <dt>抄送</dt>
                        <dd>
                            @Html.EditorFor(model => model.ATTACHMENT_NAME, new { htmlAttributes = new { @class = "input normal form-control", datatype = "*2-100", sucmsg = " " } })
                            <a class="icon-btn attach-btn"><i class="iconfont icon-add"></i><span>添加附件</span></a>
                            <div id="showAttachList" class="attach-list">
                                <ul>
                                    @if (@ViewBag.picList != null)
                                    {
                                        foreach (var item in @ViewBag.picList)
                                        {
                                            <li>
                                                <input name="hid_attach_id" type="hidden" value="@item.id" />
                                                <input name="hid_attach_filename" type="hidden" value="@item.file_name" />
                                                <input name="hid_attach_filepath" type="hidden" value="@item.file_path" />
                                                <input name="hid_attach_filesize" type="hidden" value="@item.file_size" />
                                                <i class="iconfont icon-attachment"></i>
                                                <a href="javascript:;" onclick="delAttachNode(this);" class="del" title="删除附件"><i class="iconfont icon-remove"></i></a>
                                                <a href="javascript:;" onclick="showAttachDialog(this);" class="edit" title="更新附件"><i class="iconfont icon-pencil"></i></a>
                                                <div class="title">@item.file_name</div>
                                                <div class="info">类型：<span class="ext">@item.file_ext </span> 大小：<span class="size"><%#Convert.ToInt32(Eval("file_size")) > 1024 ? Convert.ToDouble((Convert.ToDouble(Eval("file_size")) / 1024f)).ToString("0.0") + "MB" : Eval("file_size") + "KB"%></span> 下载：<span class="down"><%#Eval("down_num")%></span>次</div>
                                            </li>
                                        }
                                    }
                                </ul>
                            </div>
                        </dd>
                    </dl>
                    <dl>
                        <dt>文件类别</dt>
                        <dd>
                            @Html.TextAreaFor(model => model.CONTENT, new { @class = "editor" })
                        </dd>
                    </dl>
                    <dl>
                        <dt>子类别</dt>
                        <dd>
                            @Html.EditorFor(model => model.KEYWORD, new { htmlAttributes = new { @class = "input normal form-control", datatype = "*2-100", sucmsg = " " } })
                            <a class="icon-btn add spec-btn"><span>自动获取</span></a>
                        </dd>
                    </dl>
                    <dl>
                        <dt>使用模板</dt>
                        <dd>
                            @Html.EditorFor(model => model.KEYWORD, new { htmlAttributes = new { @class = "input normal form-control", datatype = "*2-100", sucmsg = " " } })
                            <a class="icon-btn add spec-btn"><span>自动获取</span></a>
                        </dd>
                    </dl>
                    <dl>
                        <dt>导入文件</dt>
                        <dd>
                            @Html.EditorFor(model => model.KEYWORD, new { htmlAttributes = new { @class = "input normal form-control", datatype = "*2-100", sucmsg = " " } })
                            <a class="icon-btn add spec-btn"><span>自动获取</span></a>
                        </dd>
                    </dl>
                </div>
                    <div class="from-footer">
                        <div class="btn-wrap" style="position: fixed;">
                            <a class="btn btn-sm btn-primary radius">
                                <i class="iconfont icon-save"></i>
                                提交保存
                            </a>
                            <a class="btn btn-sm btn-warning radius">
                                <i class="iconfont icon-fanhui"></i>
                                取消关闭
                            </a>
                        </div>
                    </div>
                }
            </div>
        </div>
    </div>
</div>

